Generally, data storage devices are configured to write data to multiple storage elements concurrently, rather than, for example, writing data to one storage element at a time. For such data storage devices, the smallest set of storage elements that can be written at a time may be referred to as a write block. Since individual write commands may be associated with less than a full write block of data, a data storage device may store data that is to be written to a non-volatile memory in a volatile cache. After sufficient data is available in the cache to fill a write block, a full write block of data may be written from the volatile cache to the non-volatile memory.
In certain circumstances, a device (e.g., a host) coupled to the data storage device may issue a command to clear the cache (such as a flush command), or the device may issue a write command that includes a force unit access flag indicating that data associated with the write command is to be indicated as complete only after the data is written to non-volatile memory. When either of these commands is received, the data storage device may add padding to the data that is to be written to the non-volatile memory (e.g., the data in the cache or the data associated with the flagged write command) in order to generate a padded full write block of data, and the padded full write block of data may be written to the non-volatile memory. Since the padding is not data received from the host, storing the padding in the non-volatile memory is an inefficient use of storage capacity of the non-volatile memory.